from pymongo import MongoClient
from etc import DATABASECONF, DATABASECONF_FACEBOOK, DATABASECONF_LINKEDIN


def get_mongodb_twitter_connection(collection_name):
    client = MongoClient(DATABASECONF['mongodb'])
    return client[DATABASECONF['mongodb_database']][collection_name]


def get_mongodb_facebook_connection(collection_name):
    client = MongoClient(DATABASECONF_FACEBOOK['mongodb'])
    return client[DATABASECONF_FACEBOOK['mongodb_database']][collection_name]

def get_mongodb_linkedin_connection(collection_name):
    client = MongoClient(DATABASECONF_LINKEDIN['mongodb'])
    return client[DATABASECONF_LINKEDIN['mongodb_database']][collection_name]

